Can You Provide More Information On Contabo's Horizen Node Image?

Can you provide more information on Contabo's Horizen Node image?

Contabo's Horizen Node image is based on the Zen (https://github.com/HorizenOfficial/zen).


The image contain every required dependency to setup your Horizen Node for staking.


How do I switch to the Horizen user?

You can use the below command to login to the Horizen user. We recommend using this user as it was created for security reasons.


su horizen

How do I run Zen-CLI commands?

P2P Network info: zen-cli getnetworkinfo

Request sync status: zen-cli getblockchaininfo

 

How do I setup my node for staking?

To note the following commands should be executed as the root user (or user with sudo privileges). 


How do I disable Apache to avoid port conflicts?

You can run the following commands:


sudo systemctl disable apache2
sudo systemctl stop apache2

How do I install Certbot for SSL?

You can run the following command:


sudo certbot certonly --preferred-chain "ISRG Root X1" --key-type rsa -n --agree-tos --register-unsafely-without-email --standalone -d $FQDN

How do I setup certificates for Horizen node?

You can run the following commands:

sudo chown -R horizen:horizen /etc/letsencrypt/

sudo chmod -R 750 /etc/letsencrypt/

sudo csplit -s -z -f /usr/local/share/ca-certificates/intermediate-cert- /etc/letsencrypt/live/$FQDN/chain.pem '/-----BEGIN CERTIFICATE-----/' '{*}' --suffix-format='%02d.crt'

sudo update-ca-certificates --fresh\

How do I write out the certificates to the config file?

You can run the following command:


echo "tlscertpath=/etc/letsencrypt/live/$FQDN/cert.pem" >> /home/horizen/.zen/zen.conf
echo "tlskeypath=/etc/letsencrypt/live/$FQDN/privkey.pem" >> /home/horizen/.zen/zen.conf

export IPV4=$(ip -4 addr show eth0 | grep -oP '(?<=inet\s)\d+(\.\d+){3}')

echo "externalip=$IPV4" >> /home/horizen/.zen/zen.conf

echo "port=9033" >> /home/horizen/.zen/zen.conf

How do I restart the Zen node?

To note this step should be executed by the horizen user then switch back to the root user to finish the setup.

You can run the following command to restart the Zen node:


zen-cli stop && sleep 60 && zend && sleep 30

How do I install the Node Tracker?

Nodetracker is an application which managing your staking.


You can install it by running the below command:

sudo apt-get update
sudo apt-get install -y ca-certificates curl gnupg
sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg

NODE_MAJOR=18
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list

sudo apt-get update
sudo apt-get install nodejs -y

cd ~/ && git clone https://github.com/HorizenOfficial/nodetracker.git

cd nodetracker

How do I setup the Node Tracker?

You can run the following command:

ZENCONF=/home/horizen/.zen/zen.conf ZEN_HOME=/home/horizen/.zen/zen.conf node setup.js

If you would like to setup a testing version of the Node Tracker you run the following command:

ZENCONF=/home/horizen/.zen/zen.conf ZEN_HOME=/home/horizen/.zen/zen.conf node app.js

How do I start the Node Tracker with PM2 for auto-restart?

You can run the following command:


npm install pm2@latest -g

ZENCONF=/home/horizen/.zen/zen.conf ZEN_HOME=/home/horizen/.zen/zen.conf pm2 start app.js --name nodetracker

How do I read logs for Node Tracker?

You can run the following command:


pm2 logs nodetracker

Official Horizen Documentation:


You can find the official Horizen documentation here with more information.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select atleast one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article

Modified on 25 Mar 2024

Can’t find what you’re looking for?

Get in Touch

Do you have a pre-sales question?